import Main from 'component/Main';
import { TOKEN_NAME } from 'constant/app';
import * as React from 'react';
import { Redirect } from 'react-router';

export interface ICheckLoginProps {
}

export interface ICheckLoginState {
}

export default class CheckLogin extends React.Component<ICheckLoginProps, ICheckLoginState> {
  constructor(props: ICheckLoginProps) {
    super(props);

    this.state = {
    }
  }

  public render() {
    return (
      <>
        {localStorage.getItem(TOKEN_NAME)?<Main/>:<Redirect to={"/login"}/>}
      </>
    );
  }
}
